(function() {
    var msg = 'msg';

    function doSomething() {
        console.log('doSomething' + msg.toLowerCase());
    }

    function doOtherThing() {
        console.log('doOtherThing' + msg.toUpperCase());
    }
    window.myModule2 = {
        doSomething: doSomething,
        doOtherThing: doOtherThing
    }
})()